//***************************************************************************
//*
//*	File:			dswl_genericwindow.h
//*	Description:	Wrapper for IGenericWindow interface
//*
//***************************************************************************
//*
//*	Note:			This source code is provided "as is" meaning that you may 
//*					use it at your own risk. 
//*					You are free to use it in any way you like.
//*
//***************************************************************************
//*
//*	History:		
//*
//*	-------------------------------------------------------------------------
//*	2003/07/27	|	Initial release									|	rk
//*	-------------------------------------------------------------------------
//*
//***************************************************************************

//
//-------------------------------------------------------------- PREPROCESSOR 
//

#ifndef			_DSWL_GENERICWINDOW_H_INCLUDED
#define			_DSWL_GENERICWINDOW_H_INCLUDED

#if				_MSC_VER > 1000
#pragma once
#ifdef			__SWITCH_SHOW_HEADER
#pragma message ("-- dswl_genericwindow.h\n")
#endif
#ifdef			__SWITCH_SHOW_HEADER_TREE
#pragma message ("-- "__FILE__"\n")
#endif
#endif 

#ifdef			_DSWL_SWITCH_USE_AUTOCAST
#ifdef			_DSWL_SWITCH_USE_UNSAFE_AUTOCAST
#pragma	message ( "-- dswl_genericwindow.h \t Warning: Generating auto-cast operator: CIGenericWindow::operator IGenericWindow* () const" )
#else
#pragma	message ( "-- dswl_genericwindow.h \t Warning: Generating auto-cast operator: CIGenericWindow::operator       IGenericWindow* ()" )
#pragma	message ( "-- dswl_genericwindow.h \t Warning: Generating auto-cast operator: CIGenericWindow::operator const IGenericWindow* () const" )
#endif
#endif

//
//-------------------------------------------------------------- DEPENDENCIES
//

//
//------------------------------------------------------ FORWARD DECLARATIONS
//

class			CIApplication	;

//
//--------------------------------------------------------- CLASS DECLARATION
//

//***************************************************************************
//**	@DOC		CLASS CIGenericWindow
//***************************************************************************
//*		@CLASS		Wrapper for IGenericWindow interface
//***************************************************************************
class _DSWL_EXT_CLASS CIGenericWindow  
{
	//																								
	//-----------------------------------------------------------------------						
	//***************************     ATTRIBS     ***************************						
	//-----------------------------------------------------------------------						
	//																								
private:																											// @ACCESS	Private Attributes	
			CComPtr< IGenericWindow >	m_pIGenericWindow	;														// @CMEMBER	Smart pointer to the actual generic window interface
																									
	//																												
	//-----------------------------------------------------------------------										
	//*************************     PROPERTIES     **************************						
	//-----------------------------------------------------------------------										
	//																												
public:																												// @ACCESS	Public Property Methods
			CIApplication				GetApplication		( void )									const	;	// @CMEMBER	Determines the application this window belongs to
																										
	//																												
	//-----------------------------------------------------------------------										
	//*************************     INFORMATION     *************************						
	//-----------------------------------------------------------------------										
	//																												
public:																												// @ACCESS	Public Information Methods
			BOOL						IsNull				( void )									const	;	// @CMEMBER	Determines whether the internal pointer is <t NULL>
			BOOL						IsValid				( void )									const	;	// @CMEMBER	Determines whether the internal pointer differs from <t NULL>
										
	//																											
	//-----------------------------------------------------------------------									
	//************************     MODIFICATION     *************************				
	//-----------------------------------------------------------------------									
	//																											
public:																												// @ACCESS	Public Modification Methods
			DsSaveStatus				Close				(		BOOL				a_bSave		)			;	// @CMEMBER	Closes the window

	//																									
	//-----------------------------------------------------------------------							
	//**************************     OPERATORS     **************************							
	//-----------------------------------------------------------------------							
	//																									
public:																												// @ACCESS	Public Operators
			bool						operator	==		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	!=		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	<=		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	>=		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	<		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	>		( const CIGenericWindow&	a_Other		)	const	;	// @CMEMBER	Comparison operator
																									
			CIGenericWindow&			operator	=		(		IGenericWindow*		a_pIOther	)			;	// @CMEMBER	Copy operator
																								
			IGenericWindow*				operator	*		( void )											;	// @CMEMBER	Dereference operator
	const	IGenericWindow*				operator	*		( void )									const	;	// @CMEMBER	Dereference operator
																											
			IGenericWindow*				operator	->		( void )											;	// @CMEMBER	Member access operator
	const	IGenericWindow*				operator	->		( void )									const	;	// @CMEMBER	Member access operator
										
	#ifdef	_DSWL_SWITCH_USE_AUTOCAST
	#ifdef	_DSWL_SWITCH_USE_UNSAFE_AUTOCAST
										operator			IGenericWindow*	( void )					const	;	// @CMEMBER	TypeCast operator
	#else																								
										operator			IGenericWindow*	( void )							;	// @CMEMBER	TypeCast operator
										operator	const	IGenericWindow*	( void )					const	;	// @CMEMBER	TypeCast operator
	#endif
	#endif

	//																						
	//-----------------------------------------------------------------------				
	//***********************     CON/DESTRUCTION     ***********************				
	//-----------------------------------------------------------------------				
	//																						
public:																												// @ACCESS	Public Con-/Destruction Methods	
			 CIGenericWindow( IGenericWindow* a_pIGenericWindow = NULL );											// @CMEMBER	Default constructor
	virtual ~CIGenericWindow();																						// @CMEMBER	Default destructor
};
//***************************************************************************
//**	@END
//***************************************************************************

#endif		// _DSWL_GENERICWINDOW_H_INCLUDED
